#ifndef SERVO_H_
#define SERVO_H_

#include "../hardware.h"

/**
 * This defines the settings for the steering servo.
 **/
#define SERVO_1_PORT ((byte) 0x05)
/**
 * The null position for steering. The driven
 * direction will be straight ahead (or reverse).
 **/
#define SERVO_1_STEER_NULL ((byte) 170)
/**
 * The maximum setting to the left possible for Servo 1.
 **/
#define SERVO_1_STEER_MAX_LEFT ((byte) 95)
/**
 * The maximum setting to the right possible for Servo 1.
 **/
#define SERVO_1_STEER_MAX_RIGHT ((byte) 245)
/**
 * Sets output low for Servo 1
 **/
#define SERVO_1_LOW SERVO_PORT &= ~(1<<SERVO_1_PORT)
/**
 * Sets output high for Servo 1
 **/
#define SERVO_1_HIGH SERVO_PORT |= (1<<SERVO_1_PORT)

//Lenkung
extern void set_servo_1_direction(byte dir);

//Allgemeine Servosteuerung (PWM)
extern void set_servo(byte index, byte value);

#endif /* SERVO_H_ */
